{% extends 'layout.html' %} {% block content %}
<div class="card-body">
  <p style="font-family: 华文仿宋,serif; font-size: 15px; font-weight: 600">
    新建用户
  </p>
  <div>
    <form action="" method="post">
      {% csrf_token %}
      <input
        class="form-control"
        type="text"
        name="name"
        v-model="nameValue"
        @change="nameChange"
        placeholder="UserInfo Name ..."
        aria-label="default input example"
        style="
          font-family: 'Tw Cen MT', 华文仿宋;
          width: 700px;
          font-size: 14px;
        "
      />
      <input
        class="form-control"
        type="text"
        name="password"
        v-model="passwdValue"
        @change="passwdChange"
        placeholder="UserInfo Password ..."
        aria-label="default input example"
        style="
          font-family: 'Tw Cen MT', 华文仿宋;
          width: 700px;
          font-size: 14px;
          margin-top: 20px;
        "
      />
      <input
        class="form-control"
        type="text"
        name="age"
        v-model="ageValue"
        @change="ageChange"
        placeholder="UserInfo age ..."
        aria-label="default input example"
        style="
          font-family: 'Tw Cen MT', 华文仿宋;
          width: 700px;
          font-size: 14px;
          margin-top: 20px;
        "
      />
      <select
        class="form-select"
        aria-label="Default select example"
        name="gender"
        style="
          width: 700px;
          font-family: 'Tw Cen MT', 华文仿宋;
          font-weight: 600;
          font-size: 14px;
          margin-top: 20px;
        "
      >
        <option value="1">男</option>
        <option value="2">女</option>
      </select>
      <input
        class="form-control"
        type="text"
        name="salary"
        v-model="salaryValue"
        @change="salaryChange"
        placeholder="UserInfo Salary ..."
        aria-label="default input example"
        style="
          font-family: 'Tw Cen MT', 华文仿宋;
          width: 700px;
          font-size: 14px;
          margin-top: 20px;
        "
      />
      <input
        class="form-control"
        type="text"
        name="time"
        v-model="timeValue"
        @change="timeChange"
        placeholder="UserInfo Onboarding Time ..."
        aria-label="default input example"
        style="
          font-family: 'Tw Cen MT', 华文仿宋;
          width: 700px;
          font-size: 14px;
          margin-top: 20px;
        "
      />
      <select
        class="form-select"
        aria-label="Default select example"
        name="depart"
        style="
          width: 700px;
          font-family: 'Tw Cen MT', 华文仿宋;
          font-weight: 600;
          font-size: 14px;
          margin-top: 20px;
        "
      >
        {% for obj in departInfo %}
        <option value="{{ obj.id }}">{{ obj.title }}</option>
        {% endfor %}
      </select>
      <button
        type="submit"
        class="btn btn-primary mb-3"
        :disabled="this.nameValue === '' || this.passwdValue === '' || this.ageValue === '' || this.timeValue === '' || this.salaryValue === '' "
        style="
          margin-top: 20px;
          width: 70px;
          height: 32px;
          font-size: 13px;
          font-family: 华文宋体;
        "
      >
        保存
      </button>
    </form>
  </div>
</div>
{% endblock %}
